Using grid layouts
Grid layout arranges 3D objects in a grid. As you place objects into the grid layout Kanzi Studio automatically populates the grid with the objects from the top-left towards the bottom-right corner.
Creating a grid layout
To create a grid layout:
- In the Project right-click the scene where you want to create a grid layout and select Create > Grid Layout.
- Add several objects to the grid layout.
For example, in the Project right-click the grid layout and select Create > Box.
As you add objects, Kanzi Studio positions them in the grid from the top-left towards the bottom-left corner of the grid. The exact location of each object in the grid layout is defined by the Column and Row properties in each object.
Setting the distribution of objects in a grid layout
You can control the amount of space each object in a grid layout occupies either by setting type of the size value for any row and column. Grid layouts with proportional sizes for rows and columns are especially useful for equally distributing content.
To set the distribution of objects in a grid layout:
- Create a grid layout and add objects to it.
For example, add nine Box objects.
- In the Properties set the size of the grid layout by setting its Layout Width and Layout Height properties.
For example, set both Layout Width and Layout Height to 9.
- Set the Columns and Rows properties values to:
- Automatic to set the size of column and row to the largest object in that column and row
- Fixed to set a specific size for column and row, regardless of the size of objects in that column and row
- Proportional to set the size of columns and row relative to the size of the grid layout.The value defines the proportion that a column or row takes.
For example, if you want to equally distribute the content in columns, select Proportional and for each column use the same value.
For example, if you have three columns and you want the first one to occupy half of the grid layout width, select Proportional, use value 2 for the first column, and 1 for the other two columns.
Spanning objects in a grid layout
To set an object to span across columns and rows of a grid layout:
- Create a grid layout and add objects to it.
For example, add nine Box objects.
- In the Project select an object in the grid layout.
- In the Properties click Add Properties and add Column Span and Row Span properties.
- Set the number of columns and rows you want that object to span.
The object spans across columns to its right and rows below it.
See also
Using grid list boxes
Using grid layers
Open topic with navigation